home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1998 March / Software of the Month Club 1998 March.iso / mac / Utilities / SoundApp / SoundApp Fat / SoundApp Fat.rsrc / TEXT_1003_AppleScript.txt < prev    next >
Text File  |  1997-05-08  |  8KB  |  83 lines

  1. AppleScript
  2.  
  3. This section gives an overview of SoundAppΓÇÖs support for the AppleEvent Object Model and AppleScript. Not everything is documented here. For more information, see your documentation on AppleScript and the Scripting Dictionary of SoundApp using your favorite script editor.
  4.  
  5. Script Menu
  6. SoundApp supports a script menu which allows scripts to be executed directly from a menu in SoundApp. In order to utilize this feature, create a folder called ΓÇ£Script Menu ItemsΓÇ¥ in the same directory as the SoundApp application. Then place compiled scripts into the folder and launch SoundApp. A new ΓÇ£ScriptΓÇ¥ menu will be added to the menu bar, listing the scripts in the folder. Simply select one to run it. Scripts can direct SoundApp or other applications to do just about anything.
  7.  
  8. Application
  9. In addition to the Core Suite of open, run, and quit (print is not supported), SoundApp supports the following verbs:
  10.  
  11. Γùè convert {alias, alias list, string, string list} [to {alias, alias list, string, string list}] [encoding {PCM, ┬╡Law, IMA}] [channels {default, mono, stereo}] [bits {default, eight, sixteen}] [rate rate] [law {full, reduced, smart}] [with(out) DOSify] [as {System7, suitcase, AIFF, Wave, AU, NeXT, SD, QuickTime}]: Converts the specified file(s) to the destination file(s). If multiple source files are specified and a single destination, the destination is assumed to be a folder. If no to parameter is specified, the default conversion output method is used (as specified in the Convert pane of the Preferences dialog). The encoding, channels and bits parameters allow the encoding, channel and bit resolution setting to be overridden. The rate parameter allows the output sampling rate setting to be changed. If these are omitted, the value specified in the Convert pane of the Preferences dialog will be used. The law parameter controls whether ┬╡-law and a-law files are converted as 16-bit (full), 8-bit (reduced) or 8-bit with smart processing (smart). The DOSify parameter causes new output file names to be created with the archaic MS-DOS 8.3 filename format. This is ignored if a single file is converted and the to parameter is specified. The as parameter allows the output sound format to be specified. Again, if itΓÇÖs not specified, the default in the Convert pane of the Preferences dialog will be used instead.
  12.  
  13. Γùè play {alias, alias list, string, string list} [bits {default, eight, sixteen}] [law {full, reduced, smart}] [buffer size] [MODDriver {trecker, preferTrecker, preferZSS, ZSS}] [MODStereo {mono, stereo, enhanced}] [with(out) MODFilter] [with(out) MODSixteen] [with(out) MODTempMem] [MODVolume volume] [modRate rate] [MIDIDriver {QuickTime, OMS}] [with(out) sendGMReset] [with(out) ignoreSysEx]: Plays the file or files passed as the direct parameter. The bits and law parameters function as above. The buffer parameter specifies the size in kilobytes of the buffer used for double-buffering. A value of zero means donΓÇÖt double-buffer; otherwise, the value must be at least 64. The MODDriver, MODtereo, MODixteen, MODilter, MODTempMem, MODRate and modVolume parameters control the ΓÇ£MOD Driver,ΓÇ¥ ΓÇ£Stereo Mode,ΓÇ¥ ΓÇ£Real-Time Filter,ΓÇ¥ ΓÇ£16-Bit,ΓÇ¥ ΓÇ£Use System Memory,ΓÇ¥ ΓÇ£Playback RateΓÇ¥ and ΓÇ£VolumeΓÇ¥ settings in the MOD pane of the Preferences dialog respectively. The MIDIDriver, sendGMReset and ignoreSysEx parameters control the ΓÇ£MIDI Driver,ΓÇ¥ ΓÇ£Send General MIDI Reset,ΓÇ¥ and ΓÇ£Ignore SysEx MessagesΓÇ¥ settings in the MIDI pane of the Preferences dialog respectively. The volume value must be at least zero and no more than 255. The rate value must be at least 8000 and no more than 48000. 
  14.  
  15. Γùè get information {alias, alias list, string, string list}: Opens an information window for each of the specified files.
  16.  
  17. Γùè get status: Returns one of {idle, busy, paused} indicating what SoundApp is currently doing.
  18.  
  19. Γùè set status to {paused, next, previous, stopped}: Changes the current activity status of SoundApp. ΓÇ£PausedΓÇ¥ pauses or resumes playback, ΓÇ£nextΓÇ¥ and ΓÇ£previousΓÇ¥ jump to the next or previous file and ΓÇ£stoppedΓÇ¥ stops processing immediately.
  20.  
  21. Γùè get preferences: Returns a record containing a list of all the global preferences.
  22.  
  23. Γùè set preferences to {preference: value ΓǪ}: Changes one or all of the global preferences based on a specified record. Single preferences can be operated on directly if desired, e.g. set autoQuit to true.
  24.  
  25. Γùè get conversion setting specifier: Retrieves the indexed or named conversion setting. The object conversion settings can be used to retrieve a list of all of them.
  26.  
  27. Γùè get setting of conversion setting: Retrieves an attribute from the specified conversion setting.
  28.  
  29. Γùè set setting of conversion setting to specifier: Sets an attribute of the specified conversion setting to the specified value.
  30.  
  31. Γùè set convert settings save flag to {true, false}: Sets an internal flag which controls whether to save the conversion settings whenever they are changed via an AppleEvent. This can speed processing, but the settings will be lost when SoundApp exits. This flags has no effect when changing the settings via the menus.
  32.  
  33. Γùè get convert settings save flag: Returns the value of the internal flag which can be set with the above command.
  34.  
  35. Γùè get playback volume: Returns the current playback volume SoundApp uses relative to the system volume. The number is in the range 1 to 384. A value of 256 is 100%.
  36.  
  37. Γùè set playback volume to value: Sets the current playback volume SoundApp uses relative to the system volume. The value is the same as above.
  38.  
  39. Γùè show {about, help} window: Opens the About window and displays either the About or Help pane, respectively. You can use ΓÇ£set/get paneΓÇ¥ to manipulate the current pane in the window.
  40.  
  41. Γùè yield: Yields time to SoundApp to process files. This can be used in an AppleScript loop which waits for status to go to idle to determine when SoundApp is done.
  42.  
  43. Play Lists
  44. Play lists are references as a document in SoundApp. The following verbs can be used on them:
  45.  
  46. Γùè insert into document files file at position: Inserts the specified file at the specified position (an integer) in the list.
  47.  
  48. Γùè play from entries {selected, list of entries}: Plays either the currently selected entries or the list of entries specified.
  49.  
  50. Γùè convert from entries {selected, list of entries}: Converts either the currently selected entries or the list of entries specified.
  51.  
  52. Γùè get information from entries {selected, list of entries}: Gets information for either the currently selected entries or the list of entries specified.
  53.  
  54. Γùè delete entry: Removes the specified entry from the list.
  55.  
  56. Γùè move entry to location: Moves the specified entry to another location  in the list.
  57.  
  58. Γùè duplicate entry to location: Creates a copy of the specified entry at another location in the list.
  59.  
  60. Γùè set {shuffle, repeatProcessing} to {true, false}: Changes the value of the Shuffle and Repeat checkboxes.
  61.  
  62. Γùè get {shuffle, repeatProcessing}: Retrieves the value of the Shuffle and Repeat checkboxes.
  63.  
  64. Γùè get sort mode: Retrieves the sorting mode. Valid values are none, by name and by type.
  65.  
  66. Γùè set sort mode to {none, by name, by type}: Retrieves or changes the sorting mode.
  67.  
  68. Γùè get selection: Retrieves the current selection.
  69.  
  70. Γùè set selection to {entry, list of entries}: Changes the selection to the specified entry or entries.
  71.  
  72. Objects
  73. The following objects are supported:
  74.  
  75. Γùè application: The SoundApp application.
  76.  
  77. Γùè document: A Play List document. Documents can only be referenced by name.
  78.  
  79. Γùè entry: An entry in a Play List.
  80.  
  81. Γùè conversion setting: A list containing all the output setting parameters.
  82.  
  83. Γùè preferences record: A record consisting of all the SoundApp global preferences. Settings in the Convert menu are not included here.